package cn.kgc.service.impl;

import cn.kgc.bean.pojo.EqDevice;
import cn.kgc.mapper.EqDeviceMapper;
import cn.kgc.service.EqDeviceService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @projectName: safetyMag
 * @package: cn.kgc.service.impl
 * @className: EqDeviceServiceImpl
 * @author: yindexin
 * @description: TODO
 * @date: 2023/5/1 23:39
 * @version: 1.0
 */
@Service("eqDeviceService")
public class EqDeviceServiceImpl implements EqDeviceService {

    @Resource
    private EqDeviceMapper eqDeviceMapper;

    @Override
    public List<EqDevice> getEqDeviceAll() {
        return eqDeviceMapper.getEqDeviceAll();
    }

    @Override
    public boolean addEqDeviceAll(EqDevice eqDevice) {
        int count = eqDeviceMapper.addEqDeviceAll(eqDevice);
        if (count > 0) {
            return true;
        }
        return false;
    }

    @Override
    public boolean deletEqDeviceAllById(Integer id) {
        int count = eqDeviceMapper.deletEqDeviceAllById(id);
        if (count > 0) {
            return true;
        }
        return false;
    }

    @Override
    public boolean UpdateEqDeviceAll(EqDevice eqDevice) {
        int count = eqDeviceMapper.UpdateEqDeviceAll(eqDevice);
        if (count > 0) {
            return true;
        }
        return false;
    }
}
